import 'package:json_annotation/json_annotation.dart';

part 'theme.g.dart';

@JsonSerializable()
class ThemeTourismModel {
  /// 图片地址
  String imgUrl;

  /// 名称
  String name;

  /// 等级
  int level;

  /// 评分
  double point;

  /// 评价人数
  int evaluate;

  /// 距离
  double distance;

  /// 标签
  List<String> tags;

  /// 价格
  int price;

  String? address;

  ThemeTourismModel({
    required this.imgUrl,
    required this.name,
    required this.level,
    required this.point,
    required this.evaluate,
    required this.distance,
    required this.price,
    this.tags = const [],
    this.address,
  });

  factory ThemeTourismModel.fromJson(Map<String, dynamic> json) =>
      _$ThemeTourismModelFromJson(json);

  Map<String, dynamic> toJson() => _$ThemeTourismModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}
